﻿namespace Sidvall.Security
{
    public class UserResponse
    {
        #region Public Members

        public string UserName { get; set; }
        public bool RememberMe { get; set; }

        #region Deserialize

        public static UserResponse Deserialize(string value)
        {
            return Sidvall.Serialization.SerializerManager.Current.TryDeserialize<UserResponse>(value, () =>
            {
                return new UserResponse()
                {
                    RememberMe = false,
                };
            });
        }

        #endregion
        #region Serialize

        public string Serialize()
        {
            return Serialize(this);
        }
        public static string Serialize(UserResponse item)
        {
            return Sidvall.Serialization.SerializerManager.Current.SerializeObject(item, Sidvall.Serialization.Formatting.None);
        }

        #endregion

        #endregion
        #region Constructors

        public UserResponse()
        {
        }

        #endregion
    }
}
